import request from '@/axios'
import type { TableData } from './types'

export const getRoleListApi = (data: Partial<TableData>): Promise<IResponse> => {
  return request.post({ url: '/api/v1/role/get.do', data })
}
export const delTableListApi = (ids: string[] | number[]): Promise<IResponse> => {
  return request.post({ url: '/api/v1/role/del.do', data: { ids } })
}

export const saveTableApi = (data: Partial<TableData>): Promise<IResponse> => {
  return request.post({ url: '/api/v1/role/save.do', data })
}